package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("test_papers")
public class TestPaper {
    @TableId(value = "tesr_id", type = IdType.AUTO)
    private Long tesrId;                  // 试卷ID
    
    @TableField("user_id")
    private Integer userId;               // 用户ID
    
    @TableField("topic")
    private String topic;                 // 试卷主题（用户输入的内容）
    
    @TableField("title_details")
    private String titleDetails;          // 题目详情JSON
    
    @TableField("total_tokens")
    private Integer totalTokens;          // 总tokens
    
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;      // 创建时间
    
    @TableField("ai_comments")
    private String aiComments;            // AI点评内容
    
    @TableField("correct_rate")
    private Double correctRate;           // 正确率（0-100）
}
